﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using CUREBusinessLogicLayer;

namespace CURE
{
    public partial class main : System.Web.UI.Page
    {
        MasterBll masterbll = new MasterBll();
        protected void Page_Load(object sender, EventArgs e)
        {
            string masterid = string.Empty;//当前登录用户
            if (HttpContext.Current.Request.Cookies["MWS_User"] == null)
            {
                this.Label_NAME.Text = "员工";
                this.Label_USERID.Text = "000";
                this.Label_SEX.Text = "*";
                this.Label_DEPT.Text = "***";
                this.Label_JOB.Text = "***";
                this.Label_EMAIL.Text = "**********";
                this.Label_TEL.Text = "***********";
            }
            else
            {
                masterid = HttpContext.Current.Request.Cookies["MWS_User"]["ID"];
                DataTable dt = new DataTable();
                dt = masterbll.GetUserInfoById(masterid);
                this.Label_USERID.Text = dt.Rows[0][0].ToString();
                this.Label_NAME.Text = dt.Rows[0][1].ToString();
                this.Label_SEX.Text = dt.Rows[0][2].ToString();
                this.Label_DEPT.Text = dt.Rows[0][3].ToString();
                this.Label_JOB.Text = dt.Rows[0][4].ToString();
                this.Label_EMAIL.Text = dt.Rows[0][5].ToString();
                this.Label_TEL.Text = dt.Rows[0][6].ToString();
            }

        }
    }
}